<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:f="http://java.sun.com/jsf/core"      
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:ui="http://java.sun.com/jsf/facelets">
      

<ui:composition template="/Template.xhtml">
<ui:define name="page">
	<h:form>
	<input type="hidden" name="apid" value="#{Annonces.annoncep.id}"/>
	<table>
		<tr>
			<td align="center" colspan="2">
                <h2><h:outputText value="#{Annonces.annoncep.annonceentity.titre}" id="titre"/></h2>
			</td>
		</tr>
		<tr height="40">
			<td align="right" colspan="2">
				<h:commandLink value="Ajouter aux favoris" action="CompteLogin" rendered="#{!compteLogin.connecte}"/>
				<h:panelGroup rendered="#{compteLogin.connecte and compteLogin.corp}">
					<h:commandLink value="Supprimer des favoris" action="#{Annonces.deleteDirectFavorip}" rendered="#{Annonces.favori}">
						 <f:setPropertyActionListener target="#{Annonces.actionid}" value="#{Annonces.annoncep.id}" />
					</h:commandLink>
					<h:commandLink value="Ajouter aux favoris" action="#{Annonces.addFavorip}" rendered="#{!Annonces.favori}"/>
				</h:panelGroup>
			</td>
		</tr>
		<tr>	
			<td align="left" valign="top">
                <h:outputText value="Loyer : #{Annonces.annoncep.loyer} €" id="loyer"/>
                <br/><br/><br/><h:outputText value="Surface : #{Annonces.annoncep.surface} m²" id="surface"/>
                <br/><br/><br/><h:outputText value="Ville : #{Annonces.annoncep.annonceentity.ville} (#{Annonces.annoncep.annonceentity.departement})" id="ville"/>
				<br/><br/><br/><br/>
				<div style="max-width:450px;min-width:450px;"><h:outputText value="#{Annonces.annoncep.annonceentity.texte}" id="texte"/></div>
			</td>
			<td width="250" align="center" valign="top">
				<h:graphicImage value="#{Annonces.annoncep.annonceentity.photo}" style="max-width:250px;"/>
			</td>
		</tr>
		<tr height="20">
			<td align="right" colspan="2">
			</td>
		</tr>
		
	</table>
	</h:form>
</ui:define>
</ui:composition>
</html>